package ywpt.service.config;

import java.util.List;

import ywpt.model.CommonTable;

import org.hibernate.criterion.DetachedCriteria;

public interface CommonTableService {
	public abstract CommonTable getEntityById(Long id);

	public abstract void save(CommonTable commonTable);

	public abstract void update(CommonTable commonTable);

	public abstract void remove(Long id);

	public abstract List<CommonTable> getEntitys();
	
	public abstract int getEntityCountByCriteria(DetachedCriteria query);

	@SuppressWarnings("unchecked")
	public abstract List<CommonTable> getEntitys(DetachedCriteria query);

	@SuppressWarnings("unchecked")
	public abstract List<CommonTable> getEntitys(DetachedCriteria query,
			int pageSize, int startIndex);
	
	public abstract List<CommonTable> getEntitysByName(String name,
			int start, int size);
	
	public abstract int getEntitysCountByName(String name);
	
	public abstract String createCode(String prefixCode);
	
	public abstract List<CommonTable> getCommonTableByTypesCode(String TypesCode);
	
	public abstract List<CommonTable> select(String typesCode);
	
	public abstract String creatCodeByTypeId(Long typeId);
	
	public abstract List<CommonTable> getCommonTables(DetachedCriteria query);
}
